package com.zhgxi.zf.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.slave4j.orm.hibernate.BaseEntity;

@Entity
@Table(name = "zf_role_menu")
public class RoleMenu extends BaseEntity {

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "mid", nullable = false)
	private Menu menu;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "rid", nullable = false)
	private Role role;

	public RoleMenu() {
	}

	public Menu getMenu() {
		return menu;
	}

	public void setMenu(Menu menu) {
		this.menu = menu;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

}